<!--
 * @description: 推演控制header
 * @fileName: header.vue
 * @author: ssr
 * @date: 2022-08-09 15:48:33
 * @version: V1.0.0
!-->
<template>
  <div class="sub-header">
    <div class="toolbar">
    </div>
    <div class="toolbar">
      <el-space>
        <div class="item fun-btn" :class="{ active: store.controlPanelShowTuiyan }" @click="handleControl">
          <span>推演控制</span>
        </div>
        <div class="item fun-btn" :class="{ active: store.statusPanelShowTuiyan }" @click="handleStatus">
          <span>状态栏</span>
        </div>
        <div class="item fun-btn" :class="{ active: simulStore.isShowLabel }" @click="handleLabel">
          <span>标签</span>
        </div>
        <div class="item fun-btn" :class="{ active: simulStore.isShowPath }" @click="handlePath">
          <span>路径</span>
        </div>
        <div class="item fun-btn" :class="{ active: store.entityPanelShowTuiyan }" @click="handleEntity">
          <span>实体列表</span>
        </div>
        <!-- <div class="item fun-btn" :class="{ active: simulStore.isShowInfoDomain }" @click="handleInfoDomain">
          <span>信息域</span>
        </div>
        <div class="item fun-btn" :class="{ active: simulStore.isShowFireDomain }" @click="handleFireDomain">
          <span>火力域</span>
        </div> -->
        <div class="item fun-btn" :class="{ active: store.logPanelShowTuiyan }" @click="handleLog">
          <span>日志</span>
        </div>
      </el-space>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { cesiumStateTuiyan, simulationStateTuiyan, simulPanelStateTuiyan } from "@@/store-tuiyan/modules";
import { useRouter } from "vue-router";

const store = simulPanelStateTuiyan();
const cesiumStore = cesiumStateTuiyan();
const simulStore = simulationStateTuiyan();
const router = useRouter();

// 返回主页
function handleBack() {
  window.location.href = router.resolve("/main").href;
}
// 推演控制
function handleControl() {
  store.setControlPanelShowTuiyan(!store.controlPanelShowTuiyan);
}
// 状态栏
function handleStatus() {
  store.setStatusPanelShowTuiyan(!store.statusPanelShowTuiyan);
}
// 路径
function handlePath() {
  simulStore.isShowPath = !simulStore.isShowPath;
}
// 标签
function handleLabel() {
  simulStore.isShowLabel = !simulStore.isShowLabel;
}
// 实体列表
function handleEntity() {
  store.setEntityPanelShowTuiyan(!store.entityPanelShowTuiyan);
}
// 日志
function handleLog() {
  store.setLogPanelShowTuiyan(!store.logPanelShowTuiyan);
}
// 火力域
// function handleFireDomain() {
//   simulStore.isShowFireDomain = !simulStore.isShowFireDomain;
//   cesiumStore.customViewer && simulStore.updateDomainShow(cesiumStore.customViewer)
// }
// 信息域
// function handleInfoDomain() {
//   simulStore.isShowInfoDomain = !simulStore.isShowInfoDomain;
//   cesiumStore.customViewer && simulStore.updateDomainShow(cesiumStore.customViewer)
// }
</script>
<style lang="less">
@import "@@/assets/styles/submodule.less";
</style>
